package com.running.base.run.mapper;

import com.running.base.run.domain.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    int insert(User user);

    int update(User user);

    int deleteById(Long id);

    User findById(Long id);

    List<User> findAll();

    List<User> findByRole(Integer role);
    
    User findByUsername(String username);
    
    User findByPhone(String phone);
    
    User findByUsernameOrPhone(String usernameOrPhone);
}